home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / March 96 / Initializing an Extension.1 < prev    next >
Encoding:
Internet Message Format  |  1996-12-03  |  1.5 KB  |  [TEXT/ttxt]

  1. Subject:     Initializing an Extension
  2. Sent:        3/5/96 3:59 PM
  3. Received:    3/5/96 4:11 PM
  4. From:        Bill Finzer, bfinzer@mail.keypress.com
  5. Reply-To:    ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
  7.  
  8. Subject:  Initializing an Extension         Time: 3:15 PM     Date:3/5/96
  9.  
  10. The discussion on extensions has been immensely helpful.
  11.  
  12. Damon describes the static method MyCreateXYZProc which makes the call: 
  13.  
  14. >        theExtension -> InitMySOMNautilusShellExtension (ev, part ->
  15. >              GetODPart (ev));
  16.  
  17. OK, so consider InitMySOMNautilusShellExtension. There I would like to get
  18. access to an object owned by my part and stash a reference to it in the
  19. extension. OpenDoc's SoundEditor extension, for example, initializes a field
  20.  
  21.      SoundEditor*  fOwner
  22.  
  23. using the call
  24.  
  25.     fOwner = ((SampleCode_som_SoundEditor*) owner->GetRealPart(ev))
  26.                     ->GetImplementation(ev);
  27.  
  28. How do I do that in ODF? The GetRealPart method will return an ODPart, but
  29. what I really want is my FW_CPart, the one, if I understand things correctly,
  30. that is holding onto the ODPart in its fODPart field. (I want my FW_CPart
  31. because it has a pointer to an object that I want to stash in my extension
  32. and refer to from another part.)
  33.  
  34. If I can't get access to my FW_Cpart in my version of
  35. InitMySOMNautilusShellExtension, should I make a second call in
  36. MyCreateXYZProc of the following form?
  37.  
  38.      theExtension->SetObjectOfInterest (ev, fMyObjectOfInterest);
  39.  
  40. Many thanks,
  41. Bill Finzer
  42. Educational Technology Director
  43. Key Curriculum Press
  44.